package
{
	import KK.Controls.Button.TextButton;
	import KK.Data.ToolData;
	import KK.Game.BaseMain;
	import KK.Global;
	import KK.Input.Keyboard.ToolShortcutKey;
	import KK.MainHandler;
	import KK.System.ApplicationManager;
	import KK.System.IO.File;
	import KK.System.IO.FileEvent;
	import KK.System.System;
	import KK.net.ResourceManager;
	
	import flash.display.DisplayObjectContainer;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.KeyboardEvent;
	import flash.events.MouseEvent;
	import flash.net.FileFilter;
	import flash.utils.ByteArray;

	[SWF (width="1300",height="700",frameRate=24 ,backgroundColor="0xFFFFFF")]
	public class Main extends BaseMain
	{
		static public const UI_BUTTON:String="fl.controls.Button";
		
		 
		private var handler:MainHandler;
		public function Main()
		{
			stage?init():addEventListener(Event.ADDED_TO_STAGE,init);
		}
		/**
		 *  
		 * 
		 */
		private function init(event:Event=null):void{
			
			Global.Word=this;
			
			handler=new MainHandler();
			initResource();
			
//			graphics.beginFill(0xFF,0.3);
//			graphics.drawRect(0,0,width,height); 
			stage.addEventListener(KeyboardEvent.KEY_DOWN,ToolShortcutKey.HandlerKeyDown,false,2);
			stage.addEventListener(KeyboardEvent.KEY_UP,ToolShortcutKey.HandlerKeyUp,false,2);
			
			
			 
		}
		
		/**
		 * 初始化资源  
		 * 
		 */
		private function initResource():void{
			ResourceManager.Start();
		}
		
		
	} 	
}